<?php

class DefaultController extends Controller
{
	public function actionIndex()
	{
        $dataProvider=new CActiveDataProvider('News', array(
            'criteria'=>array(
                'condition'=>'is_visible = :visible',
                'params'=>array(':visible'=>1),
                'order'=>'created_at DESC'
                )));
        $this->render('index',array(
            'dataProvider'=>$dataProvider,
        ));
	}
}
